package com.product.to;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(title = "添加订单项To")
public class AddOrderItemTo {
    @NotNull(message = "产品Id不能为空")
    @Schema(title = "产品id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long productId;

    @NotNull(message = "订单Id不能为空")
    @Schema(title = "订单id", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long orderId;

    @NotNull(message = "数量不能为空")
    @Schema(title = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long num;
}
